package com.itheima.stock.pojo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 每周内的股票数据信息
 */

@ApiModel(description = "每周内的股票数据信息")
@Data
public class WeekklineDomain {

     @ApiModelProperty(value = "一周内平均价", position = 1)
     private BigDecimal avgPrice;       //一周内平均价
     @ApiModelProperty(value = "一周内最低价", position = 2)
     private BigDecimal minPrice;       //一周内最低价
     @ApiModelProperty(value = "周一开盘价", position = 3)
     private BigDecimal openPrice;      //周一开盘价
     @ApiModelProperty(value = "一周内最高价", position = 4)
     private BigDecimal maxPrice;       //一周内最高价
     @ApiModelProperty(value = "周五收盘价（如果当前日期不到周五，则显示最新价格）", position = 5)
     private BigDecimal closePrice;     //周五收盘价（如果当前日期不到周五，则显示最新价格）
    @ApiModelProperty(value = "一周内最大时间", position = 6)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime mxTime;               //一周内最大时间
     @ApiModelProperty(value = "股票编码", position = 7)
     private String stockCode;          //股票编码
}
